
<div class="ciucourses index">
  <h2><?php __('Ciucourses');?></h2>
 
  <?php if(isset($language_list)){ ?>
  <?php 
    foreach($language_list as $key =>$val){
      //echo "<div class='button'>";
	  echo "<button>";
      echo $this->Html->link(__($val, true), array('action' => 'index', $key));
      echo "</button>";
	  //echo "</div>";
    }
  ?>
  <?php } ?>
  
  <?php if(isset($language_id)){ ?>
    <button>
      <?php echo $this->Html->link(__('Add', true), array('action' => 'add' , $language_id)); ?>
    </button>
  <?php } ?>
  
  
  <table class="zebra" cellpadding="0" cellspacing="0">
  <thead>
  <tr>
      <th><?php echo $this->Paginator->sort('Código curso');?></th>
      <th><?php echo $this->Paginator->sort('ciusubject_id');?></th>
      <th><?php echo $this->Paginator->sort('ciutimetable_id');?></th>
      <th><?php echo $this->Paginator->sort('ciuroom_id');?></th>
      <th><?php echo $this->Paginator->sort('Docente' );?></th>
      <th><?php echo $this->Paginator->sort('ciucoursestate_id');?></th>
      <th><?php echo $this->Paginator->sort('ciuacademicperiod_id');?></th>
      <th class="actions"><?php __('Actions');?></th>
  </tr>
  </thead>
  <?php
  $i = 0;
  foreach ($ciucourses as $ciucourse):
    $class = null;
    if ($i++ % 2 == 0) {
      $class = ' class="altrow"';
    }
  ?>
  <tr<?php echo $class;?>>
    <td><?php echo $ciucourse['Ciucourse']['id']; ?></td>
    <td>
      <?php echo $ciucourse['Ciusubject']['name']; ?>
    </td>
    <td>
      <?php echo $ciucourse['Ciutimetable']['name']; ?>
    </td>
    <td>
      <?php echo $ciucourse['Ciuroom']['name']; ?>
    </td>
    <td>
      <?php echo $ciucourse['Ciuuser']['name'];?>
    </td>
    <td>
      <?php echo $ciucourse['Ciucoursestate']['name']; ?>
    </td>
    <td>
      <?php echo $ciucourse['Ciuacademicperiod']['name']; ?>
    </td>
    <td class="actions">
      <?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $ciucourse['Ciucourse']['id'])); ?>
      <?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $ciucourse['Ciucourse']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $ciucourse['Ciucourse']['id'])); ?>
    </td>
  </tr>
<?php endforeach; ?>
  </table>
	<div class="paginatorcounter">
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</div>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
